﻿using Microsoft.AspNetCore.Http;
using Ya.Orm;
using System;
using System.Collections.Generic;
using System.Text;

namespace Ya.Router
{
    public class RequestEventArgs
    {
        private YaDb _db;
        public HttpContext Context
        {
            get;
            set;
        }
        public string JsonStr
        {
            get;
            set;
        }
        public YaDb Db
        {
            get
            {
                if(_db == null)
                {
                    _db = new YaDb();
                }
                return _db;
            }
        }
        public bool HasDb
        {
            get
            {
                return _db != null;
            }
        }
    }
}
